$(function(){
	$('section>div').eq(0).addClass('active').siblings().removeClass('active')
	var num=0
	var timer;
//			全屏轮播事件下
	var done = true;
	$(window).mousewheel(function(e,d){
		if (done && $('section').hasClass('mousewheel') && $(window).width() > 1024) {
			done = false;
			num=num-d;
			if (num>5) {
				num=5;
			}

			if (num<0) {
				num=0
			}
			
			var txtnum = num+1;
			if (txtnum < 9) {
				txtnum = '0'+txtnum;
			}

			$('section').stop(true,false).animate({'top':-num*100+'%'},500,function(){
				
				$('.section_control ol li').eq(num).addClass('active').siblings().removeClass('active');
				$('.section_control .txt .active').html(txtnum);
				if (num == 2 || num == 4 || num == 5) {
					$('.section_control .txt').css('color','#330000');
				}else{
					$('.section_control .txt').css('color','#fff');
				}
				done = true;
			})
			$('section>div').eq(num).addClass('active').siblings().removeClass('active');
		}
		
	})
	// 返回顶部
	$('.nav_slider .top').click(function(){
		$('section').stop(true,false).animate({'top':0},500);
		$('.section_control .txt .active').html('01');
		$('.section_control .txt').css('color','#fff');
		$('.section_control ol li').eq(0).addClass('active').siblings().removeClass('active');
		num = 0;
	})
	$('.section_control ol li').click(function(){
		var Index = $(this).index();
		var txtnum = Index+1;
		if (txtnum < 9) {
			txtnum = '0'+txtnum;
		}
		$('section').stop(true,false).animate({'top':-Index*100+'%'},500,function(){
			$('.section_control ol li').eq(Index).addClass('active').siblings().removeClass('active');
			$('.section_control .txt .active').html(txtnum);
			if (Index == 2 || Index == 4 || Index == 5) {
				$('.section_control .txt').css('color','#330000');
			}else{
				$('.section_control .txt').css('color','#fff');
			}
		})

		num = Index;
	})
	
	
})	

